<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户列表</title>
    <link rel="stylesheet" href="../assets/lib/layui/css/layui.css">
    <!-- 创建模板引擎 -->
    <script type='text/html' id='tpl_content'>
        {{each data value}}
        <tr>
            <td>{{value.id}}</td>
            <td>{{value.username}}</td>
            <td>{{value.nickname}}</td>
            <td>{{value.email}}</td>
            <td>
                <button data-id="{{value.Id}}" type="button" class="layui-btn layui-btn-xs ">
                    <a style="color: #fff" target="iframeArea" href="./edit.html?id={{value.id}}">编辑</a>
                  </button>

                <button data-id='{{value.id}}' type="button" class="layui-btn  layui-btn-xs   layui-btn-danger">删除</button>
                <button data-id='{{value.id}}' type="button" class="layui-btn rpwd  layui-btn-xs">重置密码</button>
            </td>
        </tr>
        {{/each}}
    </script>
    <!-- 重置密码弹框 -->
    <script type='text/html' id='reset_btn'>
        <form class="layui-form" action="" id='resetpwd_form' style="margin: 15px 30px 0 0">
            <!-- 密码 -->
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-inline">
                    <input type="password" name="newpwd" required lay-verify="required|len" placeholder="请输入新密码" autocomplete="off" class="layui-input   npwd">
                </div>
            </div>
            <!-- 确认密码 -->
            <div class="layui-form-item">
                <label class="layui-form-label">确认密码</label>
                <div class="layui-input-inline">
                    <input type="password" name="surepwd" required lay-verify="required|len|same" placeholder="请重复输入新密码" autocomplete="off" class="layui-input">
                </div>
            </div>
            <!-- 按钮 -->
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </script>
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">用户列表</div>
        <div class="layui-card-body">
            <table class="layui-table">
                <colgroup>
                    <col width="5%">
                    <col width="20%">
                    <col width="15%">
                    <col width="15%">
                    <col width="20%">
                </colgroup>
                <thead>
                    <th>ID</th>
                    <th>账号名称</th>
                    <th>昵称</th>
                    <th>邮箱</th>
                    <th>操作</th>
                </thead>
                <tbody class='tb'>
                    <!-- 放数据 -->
                </tbody>
            </table>
            <div id='fenye'></div>
        </div>
    </div>

    <script type='text/javascript' src='../assets/lib/jquery.js'></script>
    <script type='text/javascript' src='../assets/js/common.js'></script>
    <script type='text/javascript' src='../assets/lib/layui/layui.all.js'></script>
    <script type='text/javascript' src='../assets/lib/template-web.js'></script>
    <script type='text/javascript' src='../assets/js/js/user.js'></script>
</body>

</html>